package org.intrasearch.core.mapreduce;

import java.util.Collection;
import java.util.SortedSet;

public interface MapReduce<I, K extends Comparable<?>, V extends Comparable<?>>
{
    Object getKey();

    void map(K key, V value);

    Collection<V> reduce(K key);

    SortedSet<K> keySet();

    void setReduceTask(ReduceTask<K, V> reduceTask);

    void forceReduceAll();

    void setMapTask(MapTask<I,K,V> mapTask);

    void mapInput(I input);

    void finishAndExecute(Runnable runnable);

    void setHalfReduceThreshold(int halfReduceThreshold);
}
